package com.ztrue.common.log;

import com.ztrue.common.log.provider.LoggerProvider;
import com.ztrue.common.log.provider.Slf4jLoggerProvider;

/**
 * 提供统一的日志处理功能
 *
 * @author zhangw
 * @date 2016/10/31 17:05
 * @version: 1.0
 */
public abstract class Logger {

    private static LoggerProvider loggerProvider;

    static {
        loggerProvider = new Slf4jLoggerProvider();
    }

    public static Logger getLogger(Class clazz) {
        return loggerProvider.getLogger(clazz);
    }

    public abstract void debug(String message);

    public abstract void debug(String format, Object... args);

    public abstract void debug(String message, Throwable t);

    public abstract void debug(String format, Throwable t, Object... args);

    public abstract void info(String message);

    public abstract void info(String format, Object... args);

    public abstract void info(String message, Throwable t);

    public abstract void info(String format, Throwable t, Object... args);

    public abstract void warn(String message);

    public abstract void warn(String format, Object... args);

    public abstract void warn(String message, Throwable t);

    public abstract void warn(String format, Throwable t, Object... args);

    public abstract void error(String message);

    public abstract void error(String format, Object... args);

    public abstract void error(String message, Throwable t);

    public abstract void error(String format, Throwable t, Object... args);

    public abstract boolean isDebugEnabled();

    public abstract boolean isInfoEnabled();

    public abstract boolean isWarnEnabled();

    public abstract boolean isErrorEnabled();
}
